import {createSlice, PayloadAction} from "@reduxjs/toolkit";
import ACCESS_ENUM from "@/access/ACCESS_ENUM";
import {DEFAULT_USER} from "@/constants/user";



export const loginUserSlice = createSlice({
  name: "loginUser",
  initialState: DEFAULT_USER,
  reducers: {
    setLoginUser: (state, action: PayloadAction<API.LoginUserVO>) => {
      return {
        ...action.payload,
      };
    },
  },
});
export const { setLoginUser} = loginUserSlice.actions

// Other code such as selectors can use the imported `RootState` type

export default loginUserSlice.reducer
